<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
		 var a=new Set();
		 a.add({title:"java",num:1});
		 a.add({title:"php",num:31});
		 a.add({title:"c#",num:2});
		 console.log(a);
		 function addBook(){
			 t=window.prompt("input a title:");
			 n=window.prompt("input a numbers:");
			 for(let b of a){
				 if(b.title==t){
					 b.num=b.num+parseInt(n);
				 }
			 }
			 console.log(a);
		 }
		</script>
	</head>
	<body>
		<button type="button" onclick="addBook()">add</button>
	</body>
</html>
